<include file="Public:header" />
<div id="zoneHeader">
    <h2>广告主管理</h2>
    <ul>
        <li><a href="?c=Ader&a=add" class="btn">增加广告主</a></li>
    </ul>
</div><!--/#zoneHeader-->
<div id="zoneBody">
    <div id="zoneBodySearch">
        <form id="formSearch" action="?c={$Think.const.MODULE_NAME}">
            <input type="hidden" name="sort" />
            <input type="hidden" name="sortdir" />

            <ul>
                <li><b>ID：</b><input type="text" name="id" class="fW80p" /></li>
                <li><b>广告主名称：</b><input type="text" name="name" class="fW100p" /></li>
                <li>
                <select name="status">
                    <option value="">广告主状态</option>
                    <volist name=":C('USER_STATUS')" id="vo">
                    <option value="{$key}">{$vo}</option>
                    </volist>
                </select>
                </li>
                <li rel="searchMoreItem">邮箱：<input type="text" name="email" class="fW150p" /></li>
                <li><button type="button" id="as" class="btnSearch">查询</button></li>
                <li><button type="button" class="btnResetForm">清空表单</button></li>
                <li><label><input type="checkbox" class="btnSearchMore" /><span>高级查询</span></label></li>
            </ul>
        </form>
    </div><!--/#zoneBodySearch-->
    <div id="zoneBodyContent">
        <table class="table2">
            <thead>
                <tr>
                    <th class="tAr"><a href="javascript:;" sort="id">ID</a></th>
                    <th><a href="javascript:;" sort="name">名称</a></th>
                    <th class="tAr"><a href="javascript:;" sort="money_1">余额</a></th>
                    <th>注册时间/注册IP</th>
                    <th><a href="javascript:;" sort="last_login_time">最后登陆时间/IP</a></th>
                    <th class="tAl"><a href="javascript:;" sort="referr">注册来路</a></th>
                    <th><a href="javascript:;" sort="status">状态</a></th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                <volist name="page.record" id="vo">
                <tr class="tAr">
                    <td class="tAr"><a href="?c=User&a=switchTo&id={$vo.id}" target="_blank" title="切换到广告主平台">{$vo.id}</a></td>
                    <td class="tAl"> <a href="?c=Ader&a=modify&id={$vo.id}" title="编辑广告主信息">{$vo.name}</a> </td>
                    <td class="tAr">{$vo.money_1}&nbsp;[<a href="javascript:Recharge.add('{$vo.name}', {$vo.type})">±</a>]</td>
                    <td class="tAl">{:date('m-d H:i', strtotime($vo['create_time']))} / {$vo.create_ip}</td>
                    <td class="tAl">{:date('m-d H:i', strtotime($vo['last_login_time']))} / {$vo.last_login_ip}</td>
                    <td class="tAl"><a href="{$vo.referr|getRedirectUrl}" target="_blank">{$vo.referr|filterDomain}</a></td>
                    <td class="tAl">{$vo.status|getUserStatus}</td>
                    <td class="tAl tAction">
                        <if condition="$vo.status NEQ 1">
                        <a href="?c=Ader&a=changeStatus&id={$vo.id}&status=1" title="审核广告主" t="firm" m="确认审核此广告主吗？">审</a>
                        </if>
                        <if condition="$vo.status EQ 0 OR $vo.status EQ 1">
                        <a href="?c=Ader&a=changeStatus&id={$vo.id}&status=2" title="锁定广告主" t="firm" m="确认锁定此广告主吗？">锁</a>
                        </if>
                        <a href="?c=Ader&a=modify&id={$vo.id}" title="编辑广告主信息">编</a>
                        <a href="?c=Plan&uid={$vo.id}" title="查看计划">看计</a>
                        <a href="?c=Plan&a=add&uid={$vo.id}" title="增加计划">增计</a>
                        <a href="?c=PlanStats&day={:date('Y-m-d')}&uid={$vo.id}" title="报表" target="_blank">报表</a>
                    </td>
                </tr>
                </volist>
            </tbody>
        </table>
    </div><!--/#zoneBodyContent-->
</div><!--/#zoneBody-->
<div id="zoneFooter">{:W('Page/info', [$page])}</div><!--/#zoneFooter-->
<include file="Public:footer" />